/*
 * 23/10/2011 - 17:06
 */
package org.nettyflux.netmessages;

/**
 * @author Victor Williams Stafusa da Silva
 */
public class FailAck<E extends NetworkMessage> implements NetworkMessage {

    private final E failedRequest;
    private final Throwable failure;

    public FailAck(E failedRequest, Throwable failure) {
        this.failedRequest = failedRequest;
        this.failure = failure;
    }

    public static <E extends NetworkMessage> FailAck<E> create(E failedRequest, Throwable failure) {
        return new FailAck<E>(failedRequest, failure);
    }

    public E getFailedRequest() {
        return failedRequest;
    }

    public Throwable getFailure() {
        return failure;
    }
}
